package filter;

import java.io.*;

/**
 * 2 * @Author: 王杰
 * 3 * @Date: 2020/11/18 14:11
 * 4
 */
public class JavaCode {
    public static void main(String[] args) throws Exception {
        boolean first = true;
        BufferedReader br = new BufferedReader(new FileReader(new File("data/ip31SampleEventof40_Schema.csv")));
        BufferedWriter bw = new BufferedWriter(new FileWriter(new File("data/ip31SampleEventof40_Schema2.csv")));
        String line = null;
        while ((line = br.readLine()) != null) {
            if (first && line.contains("SampleTime")) {
                first = false;
                bw.write(line);
                bw.newLine();
            } else if (!first && line.contains("SampleTime")) {

            } else {
                bw.write(line);
                bw.newLine();
            }
        }
        bw.close();
        br.close();
    }
}
